package com.example.salaryserver.dao;

import org.apache.ibatis.annotations.*;

@Mapper
public interface EmployeeSalaryDao {

    @Insert("insert into employee_salary (employee_id, salary) values (#{employeeId}, #{salary})")
    void insertEmployeeSalary(@Param("employeeId") Long employeeId, @Param("salary") Integer salary);

    @Update("update employee_salary set status = 1 where employee_id = #{employeeId}")
    void updateSalaryStatus(@Param("employeeId") Long employeeId);

    @Delete("delete from employee_salary where employee_id = #{employeeId}")
    void deleteByEmployeeId(@Param("employeeId") Long employeeId);

}
